// SEE END OF FILE FOR LICENSE TERMS

#include "database_defines.h"

#include "libUDB.h"
#include "libDCM.h"
#include "libDCM_internal.h"

const 	DBASE	Database	=
{															
	{	DATATYPE_NULL	,	0	,	0	,	0	,	0	,	0	,	0	},		//	ID_NULL
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_DBASE_VERSION
	{	DATATYPE_BIT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_STATUS
	{	DATATYPE_UINT16	,	1	,	1	,	8	,	&udb_pwIn	,	0	,	0	},		//	ID_RADIO_INPUTS
	{	DATATYPE_UINT16	,	1	,	1	,	8	,	&udb_pwOut	,	0	,	0	},		//	ID_SERVO_OUTPUTS
	{	DATATYPE_UINT16	,	1	,	1	,	8	,	&udb_pwTrim	,	0	,	0	},		//	ID_SERVO_TRIMS
	{	DATATYPE_UINT16	,	0	,	0	,	16	,	0	,	0	,	0	},		//	ID_FAST_DATA
	{	DATATYPE_UINT16	,	0	,	0	,	16	,	0	,	0	,	0	},		//	ID_SLOW_DATA
	{	DATATYPE_IMU_NAV	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_IMU_NAV_DATA
	{	DATATYPE_LONG	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_POSITION
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_ATTITUDE
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_GROUNDSPEED
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_AIRSPEED
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_WINDSPEED
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_RAW_GYRO
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_RAW_GYRO_OFFSET
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_RAW_ACCEL
	{	DATATYPE_INT16	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_RAW_ACCEL_OFFSET
	{	DATATYPE_MEASUREMENTS	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_MEASUREMENTS
	{	DATATYPE_LONG	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_AIR_PRESSURE
	{	DATATYPE_LONG	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_AIR_PRESSURE_AT_GROUND
	{	DATATYPE_INT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_AIR_TEMPERATURE
	{	DATATYPE_ULONG	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_PITOT_ABSOLUTE
	{	DATATYPE_ULONG	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_PITOT_STATIC_DIFF
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_PITOT_TEMEPRATURE
	{	DATATYPE_BATT_FUEL	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_BATT_FUEL_COLLECTION
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_RX_BATT_PERCENT
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_RX_BATT_RATE
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_ENGINE_FUEL
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_ENGINE_FUEL_RATE
	{	DATATYPE_FRAC	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_ACCELERATION
	{	DATATYPE_FRAC	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_ROTATION
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_CALC_WINDSPEED
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_MEAS_WINDSPEED
	{	DATATYPE_FRAC	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_MAG_FIELD_EARTH
	{	DATATYPE_LONG	,	0	,	0	,	3	,	0	,	0	,	0	},		//	ID_GPS_POSITION
	{	DATATYPE_UCHAR	,	1	,	1	,	1	,	&hdop	,	0	,	0	},		//	ID_GPS_HDOP
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_GPS_SOG
	{	DATATYPE_AP_SETTINGS	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_AUTOPILOT_SETTINGS
	{	DATATYPE_WAYPOINT	,	0	,	0	,	64	,	0	,	0	,	0	},		//	ID_NV_WAYPOINTS
	{	DATATYPE_WAYPOINT	,	0	,	0	,	8	,	0	,	0	,	0	},		//	ID_RAM_WAYPOINTS
	{	DATATYPE_WAYPOINT	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_WAYPOINT_IN_USE
	{	DATATYPE_UINT16	,	0	,	0	,	1	,	0	,	0	,	0	},		//	ID_CURRENT_INDEX
	{	DATATYPE_MIXER_SETTING	,	0	,	0	,	64	,	0	,	0	,	0	},		//	ID_MIXER_SETTINGS

																		
};																		
																		

/****************************************************************************/
// This is part of the servo and radio interface software
//
// ServoInterface source code
//	http://code.google.com/p/rc-servo-interface
//
// Copyright 2010 ServoInterface Team
// See the AUTHORS.TXT file for a list of authors of ServoInterface.
//
// ServoInterface is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ServoInterface is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License 
// along with ServoInterface.  If not, see <http://www.gnu.org/licenses/>.
//
// Many parts of ServoInterface use either modified or unmodified code
// from the MatrixPilot pilot project.
// The project also contains code for modifying MatrixPilot to operate
// with ServoInterface.
// For details, credits and licenses of MatrixPilot see the AUTHORS.TXT file.
// or see this website: http://code.google.com/p/gentlenav
/****************************************************************************/
